#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int ci(int n, int k)
{
	if (k > 1)
		return (n*ci(n,k-1));
	else
		return n;
}

int mainnkcf()
{
	int n, k;
	scanf("%d %d", &n, &k);
	printf("%d",ci(n, k));
	return 0;
}